import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import Login from '../components/Login.vue'
import Register from "../components/Register.vue"
// import qwer from "../components/qwer.vue" 
import coursers from "../components/courses.vue"
import Detail from "../components/Detail.vue"
import Cart from "../components/Cart.vue"
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: Home
  },
  {
    name:"Login",
    path: "/user/login",
    component:Login,
  },
  {
    name:"Register",
    path: "/register",
    component:Register,
  },
  {
    path: '/course',
    name: 'Course',
    component: coursers,
  },
  {
    path: '/courses/detail/:id',
    name: 'Detail',
    component: Detail,
  },
  {
    path: '/cart',
    name: 'Cart',
    component: Cart,
  },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
